<!DOCTYPE html>
<html lang="zh-CN">
<head>
  <meta charset="UTF-8">
  <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no">
  <title>购物车 | 社交商城</title>
  <!-- Bootstrap 5 CSS -->
  <link href="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/css/css/bootstrapbootstrap.min.css" rel="stylesheet">
  <!-- Font Awesome -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.4.0/css/all.min.css">
  
  <style>
    :root {
      --primary: #4F46E5;
      --secondary: #6B7280;
      --light: #F9FAFB;
      --dark: #1F2937;
      --white: #FFFFFF;
      --border: #E5E7EB;
      --shadow: 0 4px 6px rgba(0, 0, 0, 0.05);
      --radius: 8px;
      
      /* 不同风格主题色 */
      --style1: #3B82F6; /* 科技蓝 */
      --style2: #EC4899; /* 活力粉 */
      --style3: #10B981; /* 生态绿 */
      --style4: #F59E0B; /* 温暖橙 */
      --style5: #8B5CF6; /* 梦幻紫 */
      --style6: #111827; /* 商务黑 */
    }
    
    body {
      font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
      background-color: #f5f5f5;
      color: var(--dark);
      min-height: 100vh;
      padding: 0;
      margin: 0;
      transition: background-color 0.3s ease;
    }
    
    .container {
      max-width: 420px;
      margin: 0 auto;
      background-color: var(--white);
      min-height: 100vh;
      box-shadow: var(--shadow);
      overflow: hidden;
      position: relative;
      transition: background-color 0.3s ease;
    }
    
    /* 购物车页面容器 */
    .cart-page {
      display: none;
      min-height: 100vh;
      flex-direction: column;
    }
    
    .cart-page.active {
      display: flex;
      animation: fadeIn 0.3s ease forwards;
    }
    
    /* 顶部导航栏 */
    .page-header {
      padding: 18px 20px;
      position: relative;
      text-align: center;
      border-bottom: 1px solid var(--border);
      background-color: var(--white);
      transition: all 0.3s ease;
      z-index: 10;
    }
    
    .page-title {
      font-size: 18px;
      font-weight: 600;
      margin: 0;
    }
    
    .header-actions {
      position: absolute;
      right: 20px;
      top: 50%;
      transform: translateY(-50%);
      display: flex;
      gap: 15px;
    }
    
    .header-btn {
      background: none;
      border: none;
      color: var(--dark);
      font-size: 20px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .header-btn:active {
      transform: scale(0.9);
    }
    
    .back-btn {
      position: absolute;
      left: 20px;
      top: 50%;
      transform: translateY(-50%);
      background: none;
      border: none;
      color: var(--dark);
      font-size: 20px;
      cursor: pointer;
    }
    
    /* 购物车列表 */
    .cart-items {
      flex: 1;
      overflow-y: auto;
      background-color: var(--white);
      transition: all 0.3s ease;
    }
    
    .cart-item {
      padding: 16px;
      border-bottom: 1px solid var(--border);
      display: flex;
      align-items: center;
      transition: background-color 0.2s ease;
    }
    
    .cart-item:hover {
      background-color: rgba(0,0,0,0.01);
    }
    
    .item-checkbox {
      margin-right: 12px;
      width: 20px;
      height: 20px;
      accent-color: var(--primary);
    }
    
    .item-image {
      width: 80px;
      height: 80px;
      border-radius: var(--radius);
      object-fit: cover;
      margin-right: 12px;
      background-color: var(--light);
    }
    
    .item-details {
      flex: 1;
      min-width: 0;
    }
    
    .item-name {
      font-weight: 500;
      margin-bottom: 4px;
      white-space: nowrap;
      overflow: hidden;
      text-overflow: ellipsis;
    }
    
    .item-spec {
      font-size: 12px;
      color: var(--secondary);
      margin-bottom: 8px;
    }
    
    .item-price {
      font-weight: 600;
      color: var(--primary);
    }
    
    .item-actions {
      display: flex;
      align-items: center;
      gap: 8px;
    }
    
    .quantity-btn {
      width: 24px;
      height: 24px;
      border-radius: 50%;
      display: flex;
      align-items: center;
      justify-content: center;
      border: 1px solid var(--border);
      background-color: var(--white);
      color: var(--dark);
      font-size: 16px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    .quantity-btn:disabled {
      opacity: 0.5;
      cursor: not-allowed;
    }
    
    .item-quantity {
      width: 30px;
      text-align: center;
      font-size: 14px;
    }
    
    .delete-btn {
      color: var(--secondary);
      background: none;
      border: none;
      font-size: 16px;
      cursor: pointer;
      margin-left: 8px;
      opacity: 0.7;
      transition: all 0.2s ease;
    }
    
    .delete-btn:hover {
      opacity: 1;
      color: #EF4444;
    }
    
    /* 空状态 */
    .empty-cart {
      display: flex;
      flex-direction: column;
      align-items: center;
      justify-content: center;
      padding: 60px 20px;
      text-align: center;
      color: var(--secondary);
      height: 100%;
    }
    
    .empty-icon {
      font-size: 80px;
      margin-bottom: 20px;
      opacity: 0.3;
    }
    
    .empty-text {
      margin-bottom: 20px;
      font-size: 16px;
    }
    
    .empty-action {
      padding: 8px 24px;
      border-radius: 6px;
      background-color: var(--primary);
      color: white;
      border: none;
      font-size: 14px;
      cursor: pointer;
      transition: all 0.2s ease;
    }
    
    /* 结算车底部 */
    .cart-footer {
      padding: 16px;
      border-top: 1px solid var(--border);
      background-color: var(--white);
      transition: all 0.3s ease;
    }
    
    .select-all {
      display: flex;
      align-items: center;
      margin-bottom: 12px;
      font-size: 14px;
    }
    
    .select-all-checkbox {
      margin-right: 8px;
      width: 18px;
      height: 18px;
      accent-color: var(--primary);
    }
    
    .delete-selected {
      color: var(--secondary);
      background: none;
      border: none;
      font-size: 14px;
      margin-left: auto;
      cursor: pointer;
    }
    
    .price-summary {
      display: flex;
      justify-content: space-between;
      margin-bottom: 16px;
    }
    
    .summary-label {
      color: var(--secondary);
    }
    
    .summary-price {
      font-size: 18px;
      font-weight: 600;
      color: var(--primary);
    }
    
    .checkout-btn {
      width: 100%;
      padding: 12px;
      border-radius: var(--radius);
      background-color: var(--primary);
      color: white;
      border: none;
      font-size: 16px;
      font-weight: 500;
      cursor: pointer;
      transition: all 0.2s ease;
      display: flex;
      align-items: center;
      justify-content: center;
      gap: 8px;
    }
    
    .checkout-btn:disabled {
      background-color: var(--secondary);
      opacity: 0.7;
      cursor: not-allowed;
    }
    
    /* 店铺分组 */
    .cart-shop {
      border-bottom: 1px solid var(--border);
    }
    
    .shop-header {
      padding: 12px 16px;
      display: flex;
      align-items: center;
      background-color: rgba(0,0,0,0.02);
    }
    
    .shop-checkbox {
      margin-right: 8px;
      width: 18px;
      height: 18px;
      accent-color: var(--primary);
    }
    
    .shop-name {
      font-size: 14px;
      font-weight: 500;
    }
    
    .shop-enter {
      margin-left: auto;
      color: var(--secondary);
      font-size: 14px;
      display: flex;
      align-items: center;
      gap: 4px;
    }
    
    /* 样式切换器 */
    .style-switcher {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 1010;
      background-color: white;
      border-radius: 8px;
      box-shadow: var(--shadow);
      overflow: hidden;
      width: 180px;
      transition: all 0.3s ease;
      transform: translateX(0);
      opacity: 1;
    }
    
    .style-switcher.hidden {
      transform: translateX(200px);
      opacity: 0;
      pointer-events: none;
    }
    
    .switcher-toggle {
      position: fixed;
      top: 20px;
      right: 20px;
      z-index: 1020;
      width: 40px;
      height: 40px;
      border-radius: 50%;
      background-color: var(--primary);
      color: white;
      display: flex;
      align-items: center;
      justify-content: center;
      box-shadow: var(--shadow);
      border: none;
      font-size: 18px;
      cursor: pointer;
      transition: all 0.3s ease;
    }
    
    .switcher-header {
      padding: 10px 16px;
      font-size: 14px;
      font-weight: 600;
      border-bottom: 1px solid #eee;
      display: flex;
      justify-content: space-between;
      align-items: center;
    }
    
    .switcher-close {
      background: none;
      border: none;
      color: var(--secondary);
      font-size: 16px;
      cursor: pointer;
    }
    
    .switcher-option {
      padding: 12px 16px;
      font-size: 14px;
      cursor: pointer;
      transition: background-color 0.2s;
      display: flex;
      align-items: center;
    }
    
    .switcher-color {
      width: 12px;
      height: 12px;
      border-radius: 50%;
      margin-right: 10px;
    }
    
    .switcher-option:hover {
      background-color: #f9f9f9;
    }
    
    .switcher-option.active {
      background-color: var(--primary);
      color: white;
    }
    
    /* 风格1：科技蓝 */
    .style-1 {
      --primary: var(--style1);
    }
    
    .style-1 .cart-item {
      border-left: 3px solid transparent;
    }
    
    .style-1 .cart-item:hover {
      border-left-color: var(--primary);
    }
    
    /* 风格2：活力粉 */
    .style-2 {
      --primary: var(--style2);
    }
    
    .style-2 .page-header {
      background-color: var(--primary);
      color: white;
      border-color: rgba(255, 255, 255, 0.2);
    }
    
    .style-2 .header-btn,
    .style-2 .page-title,
    .style-2 .back-btn {
      color: white;
    }
    
    .style-2 .cart-item {
      border-radius: 12px;
      margin: 8px;
      border: none;
      box-shadow: 0 2px 8px rgba(236, 72, 153, 0.05);
    }
    
    .style-2 .cart-footer {
      background-color: white;
      box-shadow: 0 -2px 10px rgba(0,0,0,0.03);
    }
    
    /* 风格3：生态绿 */
    .style-3 {
      --primary: var(--style3);
    }
    
    .style-3 .container {
      background-color: #F8FAFC;
    }
    
    .style-3 .cart-item {
      background-color: white;
      margin: 8px;
      border-radius: 8px;
      border: none;
    }
    
    .style-3 .quantity-btn {
      background-color: rgba(16, 185, 129, 0.1);
      border-color: var(--primary);
      color: var(--primary);
    }
    
    .style-3 .checkout-btn {
      background-color: rgba(16, 185, 129, 0.1);
      color: var(--primary);
      border: 1px solid var(--primary);
    }
    
    /* 风格4：温暖橙 */
    .style-4 {
      --primary: var(--style4);
    }
    
    .style-4 .cart-item {
      background: linear-gradient(90deg, rgba(245, 158, 11, 0.03) 0%, rgba(245, 158, 11, 0) 100%);
    }
    
    .style-4 .item-image {
      border: 2px solid rgba(245, 158, 11, 0.2);
    }
    
    .style-4 .checkout-btn {
      background: linear-gradient(90deg, var(--primary), #FBBF24);
    }
    
    /* 风格5：梦幻紫 */
    .style-5 {
      --primary: var(--style5);
    }
    
    .style-5 .container {
      background-color: #FCFAFF;
    }
    
    .style-5 .cart-footer {
      background-color: white;
      border-top: 1px solid rgba(139, 92, 246, 0.1);
    }
    
    .style-5 .item-quantity {
      color: var(--primary);
      font-weight: 500;
    }
    
    .style-5 .shop-header {
      background-color: rgba(139, 92, 246, 0.05);
    }
    
    /* 风格6：商务黑 */
    .style-6 {
      --primary: #60A5FA;
      --secondary: #9CA3AF;
      --light: #1F2937;
      --dark: #F9FAFB;
      --white: #111827;
      --border: #374151;
      --shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
    }
    
    .style-6 body {
      background-color: #030712;
    }
    
    .style-6 .container,
    .style-6 .page-header,
    .style-6 .cart-items,
    .style-6 .cart-footer,
    .style-6 .cart-item,
    .style-6 .shop-header {
      background-color: var(--white);
    }
    
    .style-6 .page-header,
    .style-6 .cart-footer {
      border-color: var(--border);
    }
    
    .style-6 .header-btn,
    .style-6 .page-title,
    .style-6 .back-btn,
    .style-6 .item-name,
    .style-6 .shop-name,
    .style-6 .select-all,
    .style-6 .delete-selected,
    .style-6 .summary-label {
      color: var(--dark);
    }
    
    .style-6 .quantity-btn {
      background-color: var(--light);
      border-color: var(--border);
      color: var(--dark);
    }
    
    .style-6 .style-switcher {
      background-color: var(--light);
    }
    
    .style-6 .switcher-header {
      border-bottom-color: var(--border);
      color: var(--dark);
    }
    
    .style-6 .switcher-option {
      color: var(--dark);
    }
    
    .style-6 .switcher-option:hover {
      background-color: rgba(255, 255, 255, 0.1);
    }
    
    /* 动画效果 */
    @keyframes fadeIn {
      from { opacity: 0; transform: translateY(10px); }
      to { opacity: 1; transform: translateY(0); }
    }
    
    @keyframes scale {
      0% { transform: scale(1); }
      50% { transform: scale(1.05); }
      100% { transform: scale(1); }
    }
    
    .scale-animation {
      animation: scale 0.3s ease;
    }
    
    /* 响应式调整 */
    @media (max-width: 360px) {
      .item-image {
        width: 70px;
        height: 70px;
      }
      
      .checkout-btn {
        font-size: 14px;
        padding: 10px;
      }
    }
  </style>
</head>
<body class="style-1">
  <!-- 样式切换器 -->
  <button class="switcher-toggle">
    <i class="fa fa-paint-brush"></i>
  </button>
  
  <div class="style-switcher hidden">
    <div class="switcher-header">
      选择页面样式
      <button class="switcher-close"><i class="fa fa-times"></i></button>
    </div>
    <div class="switcher-option active" data-style="1">
      <span class="switcher-color" style="background-color: var(--style1);"></span>
      科技蓝
    </div>
    <div class="switcher-option" data-style="2">
      <span class="switcher-color" style="background-color: var(--style2);"></span>
      活力粉
    </div>
    <div class="switcher-option" data-style="3">
      <span class="switcher-color" style="background-color: var(--style3);"></span>
      生态绿
    </div>
    <div class="switcher-option" data-style="4">
      <span class="switcher-color" style="background-color: var(--style4);"></span>
      温暖橙
    </div>
    <div class="switcher-option" data-style="5">
      <span class="switcher-color" style="background-color: var(--style5);"></span>
      梦幻紫
    </div>
    <div class="switcher-option" data-style="6">
      <span class="switcher-color" style="background-color: var(--style6);"></span>
      商务黑
    </div>
  </div>
  
  <div class="container">
    <!-- 风格1：科技蓝购物车 -->
    <div class="cart-page active" id="cart1">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">购物车 (4)</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-edit"></i></button>
        </div>
      </div>
      
      <div class="cart-items">
        <!-- 店铺1 -->
        <div class="cart-shop">
          <div class="shop-header">
            <input type="checkbox" class="shop-checkbox" checked>
            <span class="shop-name">科技数码官方旗舰店</span>
            <span class="shop-enter">进店 <i class="fa fa-angle-right"></i></span>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/96/200/200" alt="智能手机" class="item-image">
            <div class="item-details">
              <div class="item-name">超薄全面屏智能手机 8GB+128GB</div>
              <div class="item-spec">颜色：星空黑 | 版本：标准版</div>
              <div class="item-price">¥3299</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="1">-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="1">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/20/200/200" alt="无线耳机" class="item-image">
            <div class="item-details">
              <div class="item-name">无线蓝牙耳机 主动降噪</div>
              <div class="item-spec">颜色：白色</div>
              <div class="item-price">¥799</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="2">-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="2">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
        </div>
        
        <!-- 店铺2 -->
        <div class="cart-shop">
          <div class="shop-header">
            <input type="checkbox" class="shop-checkbox" checked>
            <span class="shop-name">生活家居专营店</span>
            <span class="shop-enter">进店 <i class="fa fa-angle-right"></i></span>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/118/200/200" alt="保温杯" class="item-image">
            <div class="item-details">
              <div class="item-name">不锈钢真空保温杯 500ml</div>
              <div class="item-spec">颜色：蓝色</div>
              <div class="item-price">¥89</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="3" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="3">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox">
            <img src="https://picsum.photos/id/183/200/200" alt="笔记本" class="item-image">
            <div class="item-details">
              <div class="item-name">商务笔记本 16开</div>
              <div class="item-spec">规格：2本装</div>
              <div class="item-price">¥39</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="4">-</button>
              <span class="item-quantity">2</span>
              <button class="quantity-btn plus" data-id="4">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
        </div>
      </div>
      
      <div class="cart-footer">
        <div class="select-all">
          <input type="checkbox" class="select-all-checkbox" checked>
          <span>全选</span>
          <button class="delete-selected">删除选中</button>
        </div>
        <div class="price-summary">
          <div class="summary-label">合计：</div>
          <div class="summary-price">¥4187</div>
        </div>
        <button class="checkout-btn">
          <i class="fa fa-shopping-cart"></i>
          结算 (3)
        </button>
      </div>
    </div>
    
    <!-- 风格2：活力粉购物车 -->
    <div class="cart-page" id="cart2">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">购物车 (3)</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-edit"></i></button>
        </div>
      </div>
      
      <div class="cart-items">
        <!-- 店铺1 -->
        <div class="cart-shop">
          <div class="shop-header">
            <input type="checkbox" class="shop-checkbox" checked>
            <span class="shop-name">时尚女装品牌店</span>
            <span class="shop-enter">进店 <i class="fa fa-angle-right"></i></span>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/64/200/200" alt="连衣裙" class="item-image">
            <div class="item-details">
              <div class="item-name">夏季碎花连衣裙 收腰显瘦</div>
              <div class="item-spec">颜色：粉色 | 尺码：M</div>
              <div class="item-price">¥259</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="11">-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="11">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/21/200/200" alt="T恤" class="item-image">
            <div class="item-details">
              <div class="item-name">纯棉短袖T恤 宽松款</div>
              <div class="item-spec">颜色：白色 | 尺码：L</div>
              <div class="item-price">¥89</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="12">-</button>
              <span class="item-quantity">2</span>
              <button class="quantity-btn plus" data-id="12">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
        </div>
        
        <!-- 店铺2 -->
        <div class="cart-shop">
          <div class="shop-header">
            <input type="checkbox" class="shop-checkbox" checked>
            <span class="shop-name">美妆护肤旗舰店</span>
            <span class="shop-enter">进店 <i class="fa fa-angle-right"></i></span>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/94/200/200" alt="口红" class="item-image">
            <div class="item-details">
              <div class="item-name">丝绒哑光口红 持久不脱色</div>
              <div class="item-spec">色号：#520 心动红</div>
              <div class="item-price">¥129</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="13" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="13">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
        </div>
      </div>
      
      <div class="cart-footer">
        <div class="select-all">
          <input type="checkbox" class="select-all-checkbox" checked>
          <span>全选</span>
          <button class="delete-selected">删除选中</button>
        </div>
        <div class="price-summary">
          <div class="summary-label">合计：</div>
          <div class="summary-price">¥566</div>
        </div>
        <button class="checkout-btn">
          <i class="fa fa-shopping-cart"></i>
          结算 (3)
        </button>
      </div>
    </div>
    
    <!-- 风格3：生态绿购物车 -->
    <div class="cart-page" id="cart3">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">购物车 (5)</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-edit"></i></button>
        </div>
      </div>
      
      <div class="cart-items">
        <!-- 店铺1 -->
        <div class="cart-shop">
          <div class="shop-header">
            <input type="checkbox" class="shop-checkbox" checked>
            <span class="shop-name">有机食品专卖店</span>
            <span class="shop-enter">进店 <i class="fa fa-angle-right"></i></span>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/139/200/200" alt="有机大米" class="item-image">
            <div class="item-details">
              <div class="item-name">有机大米 5kg</div>
              <div class="item-spec">规格：真空包装</div>
              <div class="item-price">¥89</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="21">-</button>
              <span class="item-quantity">2</span>
              <button class="quantity-btn plus" data-id="21">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/175/200/200" alt="有机蔬菜" class="item-image">
            <div class="item-details">
              <div class="item-name">有机蔬菜礼盒 3kg</div>
              <div class="item-spec">内含：6种时令蔬菜</div>
              <div class="item-price">¥129</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="22" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="22">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
        </div>
        
        <!-- 店铺2 -->
        <div class="cart-shop">
          <div class="shop-header">
            <input type="checkbox" class="shop-checkbox" checked>
            <span class="shop-name">环保家居生活馆</span>
            <span class="shop-enter">进店 <i class="fa fa-angle-right"></i></span>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/188/200/200" alt="竹制餐具" class="item-image">
            <div class="item-details">
              <div class="item-name">天然竹制餐具套装</div>
              <div class="item-spec">包含：碗×2 筷×2 勺×2</div>
              <div class="item-price">¥69</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="23" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="23">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox">
            <img src="https://picsum.photos/id/119/200/200" alt="棉麻桌布" class="item-image">
            <div class="item-details">
              <div class="item-name">天然棉麻桌布 120×180cm</div>
              <div class="item-spec">颜色：米色</div>
              <div class="item-price">¥59</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="24" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="24">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
        </div>
      </div>
      
      <div class="cart-footer">
        <div class="select-all">
          <input type="checkbox" class="select-all-checkbox" checked>
          <span>全选</span>
          <button class="delete-selected">删除选中</button>
        </div>
        <div class="price-summary">
          <div class="summary-label">合计：</div>
          <div class="summary-price">¥376</div>
        </div>
        <button class="checkout-btn">
          <i class="fa fa-shopping-cart"></i>
          结算 (4)
        </button>
      </div>
    </div>
    
    <!-- 风格4：温暖橙购物车 -->
    <div class="cart-page" id="cart4">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">购物车 (2)</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-edit"></i></button>
        </div>
      </div>
      
      <div class="cart-items">
        <!-- 店铺1 -->
        <div class="cart-shop">
          <div class="shop-header">
            <input type="checkbox" class="shop-checkbox" checked>
            <span class="shop-name">进口食品专营店</span>
            <span class="shop-enter">进店 <i class="fa fa-angle-right"></i></span>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/431/200/200" alt="巧克力" class="item-image">
            <div class="item-details">
              <div class="item-name">进口巧克力礼盒 200g</div>
              <div class="item-spec">口味：混合装</div>
              <div class="item-price">¥159</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="31" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="31">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/292/200/200" alt="咖啡豆" class="item-image">
            <div class="item-details">
              <div class="item-name">精选咖啡豆 500g</div>
              <div class="item-spec">产地：哥伦比亚</div>
              <div class="item-price">¥99</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="32" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="32">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
        </div>
      </div>
      
      <div class="cart-footer">
        <div class="select-all">
          <input type="checkbox" class="select-all-checkbox" checked>
          <span>全选</span>
          <button class="delete-selected">删除选中</button>
        </div>
        <div class="price-summary">
          <div class="summary-label">合计：</div>
          <div class="summary-price">¥258</div>
        </div>
        <button class="checkout-btn">
          <i class="fa fa-shopping-cart"></i>
          结算 (2)
        </button>
      </div>
    </div>
    
    <!-- 风格5：梦幻紫购物车 -->
    <div class="cart-page" id="cart5">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">购物车 (3)</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-edit"></i></button>
        </div>
      </div>
      
      <div class="cart-items">
        <!-- 店铺1 -->
        <div class="cart-shop">
          <div class="shop-header">
            <input type="checkbox" class="shop-checkbox" checked>
            <span class="shop-name">美妆护肤旗舰店</span>
            <span class="shop-enter">进店 <i class="fa fa-angle-right"></i></span>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/342/200/200" alt="精华液" class="item-image">
            <div class="item-details">
              <div class="item-name">焕颜精华液 30ml</div>
              <div class="item-spec">功效：保湿修护</div>
              <div class="item-price">¥359</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="41" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="41">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
        </div>
        
        <!-- 店铺2 -->
        <div class="cart-shop">
          <div class="shop-header">
            <input type="checkbox" class="shop-checkbox" checked>
            <span class="shop-name">香水香氛馆</span>
            <span class="shop-enter">进店 <i class="fa fa-angle-right"></i></span>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/211/200/200" alt="香水" class="item-image">
            <div class="item-details">
              <div class="item-name">女士香水 50ml</div>
              <div class="item-spec">香型：花果香调</div>
              <div class="item-price">¥299</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="42" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="42">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox">
            <img src="https://picsum.photos/id/366/200/200" alt="香薰蜡烛" class="item-image">
            <div class="item-details">
              <div class="item-name">天然香薰蜡烛 100g</div>
              <div class="item-spec">香味：薰衣草</div>
              <div class="item-price">¥89</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="43" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="43">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
        </div>
      </div>
      
      <div class="cart-footer">
        <div class="select-all">
          <input type="checkbox" class="select-all-checkbox" checked>
          <span>全选</span>
          <button class="delete-selected">删除选中</button>
        </div>
        <div class="price-summary">
          <div class="summary-label">合计：</div>
          <div class="summary-price">¥658</div>
        </div>
        <button class="checkout-btn">
          <i class="fa fa-shopping-cart"></i>
          结算 (2)
        </button>
      </div>
    </div>
    
    <!-- 风格6：商务黑购物车 -->
    <div class="cart-page" id="cart6">
      <div class="page-header">
        <button class="back-btn"><i class="fa fa-arrow-left"></i></button>
        <h1 class="page-title">购物车 (4)</h1>
        <div class="header-actions">
          <button class="header-btn"><i class="fa fa-edit"></i></button>
        </div>
      </div>
      
      <div class="cart-items">
        <!-- 店铺1 -->
        <div class="cart-shop">
          <div class="shop-header">
            <input type="checkbox" class="shop-checkbox" checked>
            <span class="shop-name">商务办公设备店</span>
            <span class="shop-enter">进店 <i class="fa fa-angle-right"></i></span>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/160/200/200" alt="笔记本电脑" class="item-image">
            <div class="item-details">
              <div class="item-name">轻薄商务笔记本电脑</div>
              <div class="item-spec">配置：i7/16GB/512GB</div>
              <div class="item-price">¥7999</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="51" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="51">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/119/200/200" alt="无线鼠标" class="item-image">
            <div class="item-details">
              <div class="item-name">无线蓝牙鼠标</div>
              <div class="item-spec">颜色：黑色</div>
              <div class="item-price">¥129</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="52" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="52">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
        </div>
        
        <!-- 店铺2 -->
        <div class="cart-shop">
          <div class="shop-header">
            <input type="checkbox" class="shop-checkbox" checked>
            <span class="shop-name">商务礼品定制中心</span>
            <span class="shop-enter">进店 <i class="fa fa-angle-right"></i></span>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox" checked>
            <img src="https://picsum.photos/id/28/200/200" alt="钢笔" class="item-image">
            <div class="item-details">
              <div class="item-name">商务钢笔礼盒</div>
              <div class="item-spec">颜色：银色</div>
              <div class="item-price">¥299</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="53">-</button>
              <span class="item-quantity">2</span>
              <button class="quantity-btn plus" data-id="53">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
          
          <div class="cart-item">
            <input type="checkbox" class="item-checkbox">
            <img src="https://picsum.photos/id/3/200/200" alt="笔记本" class="item-image">
            <div class="item-details">
              <div class="item-name">商务笔记本套装</div>
              <div class="item-spec">规格：A5/120页</div>
              <div class="item-price">¥89</div>
            </div>
            <div class="item-actions">
              <button class="quantity-btn minus" data-id="54" disabled>-</button>
              <span class="item-quantity">1</span>
              <button class="quantity-btn plus" data-id="54">+</button>
              <button class="delete-btn"><i class="fa fa-trash-o"></i></button>
            </div>
          </div>
        </div>
      </div>
      
      <div class="cart-footer">
        <div class="select-all">
          <input type="checkbox" class="select-all-checkbox" checked>
          <span>全选</span>
          <button class="delete-selected">删除选中</button>
        </div>
        <div class="price-summary">
          <div class="summary-label">合计：</div>
          <div class="summary-price">¥8756</div>
        </div>
        <button class="checkout-btn">
          <i class="fa fa-shopping-cart"></i>
          结算 (3)
        </button>
      </div>
    </div>
  </div>
  
  <!-- Bootstrap JS -->
  <script src="https://cdn.jsdelivr.net/npm/bootstrap@5.3.0/dist/js/bootstrap.bundle.min.js"></script>
  
  <script>
    // 当前状态
    let currentStyle = 1;
    
    // DOM元素
    const switcherToggle = document.querySelector('.switcher-toggle');
    const switcher = document.querySelector('.style-switcher');
    const switcherClose = document.querySelector('.switcher-close');
    const switcherOptions = document.querySelectorAll('.switcher-option');
    const cartPages = {
      1: document.getElementById('cart1'),
      2: document.getElementById('cart2'),
      3: document.getElementById('cart3'),
      4: document.getElementById('cart4'),
      5: document.getElementById('cart5'),
      6: document.getElementById('cart6')
    };
    const bodyElement = document.body;
    const backButtons = document.querySelectorAll('.back-btn');
    const quantityButtons = document.querySelectorAll('.quantity-btn');
    const deleteButtons = document.querySelectorAll('.delete-btn');
    const checkboxes = document.querySelectorAll('input[type="checkbox"]');
    const selectAllCheckbox = document.querySelector('.select-all-checkbox');
    
    // 初始化
    function init() {
      // 初始化数量按钮
      initQuantityButtons();
      
      // 初始化删除按钮
      initDeleteButtons();
      
      // 初始化复选框
      initCheckboxes();
      
      // 切换器控制
      switcherToggle.addEventListener('click', toggleSwitcher);
      switcherClose.addEventListener('click', toggleSwitcher);
      
      // 切换样式
      switcherOptions.forEach(option => {
        option.addEventListener('click', function() {
          const style = parseInt(this.getAttribute('data-style'));
          switchStyle(style);
          toggleSwitcher();
        });
      });
      
      // 键盘导航切换样式
      document.addEventListener('keydown', function(e) {
        if (e.key === 'ArrowLeft') {
          let prev = currentStyle - 1;
          if (prev < 1) prev = 6;
          switchStyle(prev);
        } else if (e.key === 'ArrowRight') {
          let next = currentStyle + 1;
          if (next > 6) next = 1;
          switchStyle(next);
        }
      });
      
      // 返回按钮
      backButtons.forEach(btn => {
        btn.addEventListener('click', function() {
          // 返回上一页
          history.back();
        });
      });
    }
    
    // 初始化数量按钮
    function initQuantityButtons() {
      quantityButtons.forEach(btn => {
        btn.addEventListener('click', function() {
          const parent = this.parentElement;
          const quantityEl = parent.querySelector('.item-quantity');
          let quantity = parseInt(quantityEl.textContent);
          
          if (this.classList.contains('plus')) {
            quantity++;
            parent.querySelector('.minus').removeAttribute('disabled');
          } else if (this.classList.contains('minus')) {
            if (quantity > 1) {
              quantity--;
              if (quantity === 1) {
                this.setAttribute('disabled', 'disabled');
              }
            }
          }
          
          quantityEl.textContent = quantity;
          quantityEl.classList.add('scale-animation');
          setTimeout(() => {
            quantityEl.classList.remove('scale-animation');
          }, 300);
          
          // 更新总价（实际应用中需要计算）
          updateTotalPrice();
        });
      });
    }
    
    // 初始化删除按钮
    function initDeleteButtons() {
      deleteButtons.forEach(btn => {
        btn.addEventListener('click', function() {
          const item = this.closest('.cart-item');
          if (confirm('确定要删除该商品吗？')) {
            item.style.height = item.offsetHeight + 'px';
            item.style.overflow = 'hidden';
            item.style.transition = 'all 0.3s ease';
            
            setTimeout(() => {
              item.style.height = '0';
              item.style.opacity = '0';
              item.style.margin = '0';
              
              setTimeout(() => {
                item.remove();
                // 更新商品数量和总价
                updateItemCount();
                updateTotalPrice();
              }, 300);
            }, 10);
          }
        });
      });
    }
    
    // 初始化复选框
    function initCheckboxes() {
      // 全选复选框
      selectAllCheckbox.addEventListener('change', function() {
        const checkboxes = document.querySelectorAll('.cart-page.active .item-checkbox, .cart-page.active .shop-checkbox');
        checkboxes.forEach(checkbox => {
          checkbox.checked = this.checked;
        });
        updateTotalPrice();
      });
      
      // 店铺复选框
      const shopCheckboxes = document.querySelectorAll('.shop-checkbox');
      shopCheckboxes.forEach(checkbox => {
        checkbox.addEventListener('change', function() {
          const shop = this.closest('.cart-shop');
          const itemCheckboxes = shop.querySelectorAll('.item-checkbox');
          itemCheckboxes.forEach(itemCheckbox => {
            itemCheckbox.checked = this.checked;
          });
          updateSelectAllStatus();
          updateTotalPrice();
        });
      });
      
      // 商品复选框
      const itemCheckboxes = document.querySelectorAll('.item-checkbox');
      itemCheckboxes.forEach(checkbox => {
        checkbox.addEventListener('change', function() {
          const shop = this.closest('.cart-shop');
          const itemCheckboxes = shop.querySelectorAll('.item-checkbox');
          const allChecked = Array.from(itemCheckboxes).every(cb => cb.checked);
          shop.querySelector('.shop-checkbox').checked = allChecked;
          
          updateSelectAllStatus();
          updateTotalPrice();
        });
      });
    }
    
    // 更新全选状态
    function updateSelectAllStatus() {
      const activePage = document.querySelector('.cart-page.active');
      const allItemCheckboxes = activePage.querySelectorAll('.item-checkbox');
      const checkedItemCheckboxes = activePage.querySelectorAll('.item-checkbox:checked');
      selectAllCheckbox.checked = allItemCheckboxes.length === checkedItemCheckboxes.length && allItemCheckboxes.length > 0;
    }
    
    // 更新商品数量
    function updateItemCount() {
      const activePage = document.querySelector('.cart-page.active');
      const itemCount = activePage.querySelectorAll('.cart-item').length;
      const pageTitle = activePage.querySelector('.page-title');
      pageTitle.textContent = `购物车 (${itemCount})`;
      
      // 检查是否为空购物车
      if (itemCount === 0) {
        const cartItems = activePage.querySelector('.cart-items');
        cartItems.innerHTML = `
          <div class="empty-cart">
            <div class="empty-icon"><i class="fa fa-shopping-cart"></i></div>
            <div class="empty-text">购物车是空的</div>
            <button class="empty-action">去逛逛</button>
          </div>
        `;
        
        // 更新底部
        const cartFooter = activePage.querySelector('.cart-footer');
        cartFooter.style.display = 'none';
      }
    }
    
    // 更新总价（模拟计算）
    function updateTotalPrice() {
      const activePage = document.querySelector('.cart-page.active');
      const checkedItems = activePage.querySelectorAll('.item-checkbox:checked');
      const checkoutBtn = activePage.querySelector('.checkout-btn');
      const summaryPrice = activePage.querySelector('.summary-price');
      
      // 实际应用中应该根据商品单价和数量计算
      let total = 0;
      checkedItems.forEach(item => {
        const priceText = item.closest('.cart-item').querySelector('.item-price').textContent;
        const price = parseFloat(priceText.replace('¥', ''));
        const quantity = parseInt(item.closest('.cart-item').querySelector('.item-quantity').textContent);
        total += price * quantity;
      });
      
      // 更新显示
      summaryPrice.textContent = `¥${total.toFixed(2)}`;
      checkoutBtn.innerHTML = `<i class="fa fa-shopping-cart"></i> 结算 (${checkedItems.length})`;
      
      // 禁用/启用结算按钮
      if (checkedItems.length === 0) {
        checkoutBtn.setAttribute('disabled', 'disabled');
      } else {
        checkoutBtn.removeAttribute('disabled');
      }
    }
    
    // 切换样式选择器显示/隐藏
    function toggleSwitcher() {
      switcher.classList.toggle('hidden');
    }
    
    // 关闭所有页面
    function closeAllPages() {
      Object.values(cartPages).forEach(page => {
        page.classList.remove('active');
      });
    }
    
    // 切换样式
    function switchStyle(style) {
      // 移除所有样式类
      bodyElement.classList.remove('style-1', 'style-2', 'style-3', 'style-4', 'style-5', 'style-6');
      
      // 添加当前样式类
      bodyElement.classList.add(`style-${style}`);
      
      // 更新当前样式
      currentStyle = style;
      
      // 更新切换器选中状态
      switcherOptions.forEach(option => {
        option.classList.remove('active');
        if (parseInt(option.getAttribute('data-style')) === style) {
          option.classList.add('active');
        }
      });
      
      // 显示对应页面
      closeAllPages();
      cartPages[style].classList.add('active');
      
      // 重新初始化当前页面的全选状态
      updateSelectAllStatus();
    }
    
    // 启动
    init();
  </script>
</body>
</html>
